package com.supply.dl.app;

import com.supply.dl.app.http.BaseInfo;
import com.supply.dl.bean.*;
import com.supply.dl.bean.request.*;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.*;

import java.util.List;
import java.util.Map;

/**
 * Description: 接口列表,注意事项
 * <pre>
 *    BaseUrl 和URL有关的注解中提供的值 最后结果
 *    http://localhost:4567/path/to/other/ /post http://localhost:4567/post
 *    http://localhost:4567/path/to/other/ post http://localhost:4567/path/to/other/post
 *    http://localhost:4567/path/to/other/ https://github.com/ikidou https://github.com/ikidou
 *    从上面不能难看出以下规则：
 *    如果你在注解中提供的url是完整的url，则url将作为请求的url。
 *    如果你在注解中提供的url是不完整的url，且不以 / 开头，则请求的url为baseUrl+注解中提供的值
 *    如果你在注解中提供的url是不完整的url，且以 / 开头，则请求的url为baseUrl的主机部分+注解中提供的值
 * Author：skyTian
 * Time:2017/11/1 10:36
 * CopyRight:com,sky
 * Retrofit的数据请求接口
 */
public interface ApiService {

    /**
     * 入库定位列表
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.IN_BOUND_LOCATION)
    Observable<BaseInfo<List<InAndOutBoundLocationBean>>> getInboundLocation(@Body InBoundLocationReq req,
                                                                             @Header("pageNum") String pageNum,
                                                                             @Header("pageSize") String pageSize);

    /**
     * 出库定位列表
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.OUT_BOUND_LOCATION)
    Observable<BaseInfo<List<InAndOutBoundLocationBean>>> getOutboundLocation(@Body InBoundLocationReq req,
                                                                              @Header("pageNum") String pageNum,
                                                                              @Header("pageSize") String pageSize);

    /**
     * 通知单入库定位详情
     *
     * @param noticeOrderId 非空时调用
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.NOTICE_POSITION_IN_BOUND_DETAIL)
    Observable<BaseInfo<PositionDetailBean>> getPositionInBoundDetailByNoticeOrderId(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 通知单入库定位详情
     *
     * @param orderId noticeOrderId 为空时调用
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.NOTICE_POSITION_IN_BOUND_DETAIL)
    Observable<BaseInfo<PositionDetailBean>> getPositionInBoundDetailByOrderId(@Field("orderId") String orderId);

    /**
     * 通知单出库定位详情
     * 通知单ID非空时调用，参数为通知单ID
     * 3.8接口：订单定位详情：wms/app/new/so/position/detail
     *
     * @param noticeOrderId 非空时调用
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.NOTICE_POSITION_OUT_BOUND_DETAIL)
    Observable<BaseInfo<PositionDetailBean>> getPositionOutBoundDetailByNoticeOrderId(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 通知单出库定位详情
     * 通知单ID为空时调用，参数为订单ID
     * 3.8接口：订单定位详情：wms/app/new/so/position/detail
     *
     * @param orderId noticeOrderId 为空时调用
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.NOTICE_POSITION_OUT_BOUND_DETAIL)
    Observable<BaseInfo<PositionDetailBean>> getPositionOutBoundDetailByOrderId(@Field("orderId") String orderId);

    /**
     * 通知单入库列表
     *
     * @param noticeRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.NOTICE_IN_BOUND)
    Observable<BaseInfo<List<InAndOutBoundLocationBean>>> getNoticeInBoundList(@Body NoticeRequest noticeRequest,
                                                                               @Header("pageNum") String pageNum,
                                                                               @Header("pageSize") String pageSize);

    /**
     * 通知单出库列表
     *
     * @param noticeRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.NOTICE_OUT_BOUND)
    Observable<BaseInfo<List<InAndOutBoundLocationBean>>> getNoticeOutBoundList(@Body NoticeRequest noticeRequest,
                                                                                @Header("pageNum") String pageNum,
                                                                                @Header("pageSize") String pageSize);

    /**
     * 通知单入库详情
     *
     * @param noticeOrderId
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.NOTICE_IN_BOUND_DETAIL)
    Observable<BaseInfo<NoticeBoundDetailBean>> getNoticeInBoundDetailList(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 通知单出库详情
     *
     * @param noticeOrderId
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.NOTICE_OUT_BOUND_DETAIL)
    Observable<BaseInfo<NoticeBoundDetailBean>> getNoticeOutBoundDetailList(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 订单入库列表
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.ORDER_IN_BOUND)
    Observable<BaseInfo<List<OrderInAndOutBoundBean>>> getOrderInBoundList(@Body OrderBoundRequest req,
                                                                           @Header("pageNum") String pageNum,
                                                                           @Header("pageSize") String pageSize);

    /**
     * 订单出库列表
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.ORDER_OUT_BOUND)
    Observable<BaseInfo<List<OrderInAndOutBoundBean>>> getOrderOutBoundList(@Body OrderBoundRequest req,
                                                                            @Header("pageNum") String pageNum,
                                                                            @Header("pageSize") String pageSize);

    /**
     * 订单入库详情
     *
     * @param orderId
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.ORDER_IN_BOUND_DETAIL)
    Observable<BaseInfo<OrderBoundDetailBean>> getOrderInBoundDetailData(@Field("orderId") String orderId);

    /**
     * 订单出库详情
     *
     * @param orderId
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.ORDER_OUT_BOUND_DETAIL)
    Observable<BaseInfo<OrderBoundDetailBean>> getOrderOutBoundDetailData(@Field("orderId") String orderId);

    /**
     * 收货确认列表
     *
     * @param confirmRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.RECEIVING_GOODS_CONFIRM)
    Observable<BaseInfo<List<InAndOutBoundLocationBean>>> getReceivingGoodsConfirmList(@Body ReceivingAndSendGoodsConfirmRequest confirmRequest,
                                                                                       @Header("pageNum") String pageNum,
                                                                                       @Header("pageSize") String pageSize);

    /**
     * 收货确认详情
     *
     * @param noticeOrderId 通知单ID
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.RECEIVING_GOODS_CONFIRM_DETAIL)
    Observable<BaseInfo<ReceivingAndSendGoodsConfirmDetailBean>> getReceivingGoodsConfirmDetailList(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 收货确认过账
     *
     * @param noticeOrderId
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.RECEIVING_GOODS_CONFIRM_DETAIL_POSTING_ACCOUNT)
    Observable<BaseInfo<ReceivingAndSendGoodsConfirmDetailBean>> postingAccountReceivingGoodsConfirm(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 发货确认列表
     *
     * @param confirmRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.SEND_GOODS_CONFIRM)
    Observable<BaseInfo<List<InAndOutBoundLocationBean>>> getSendGoodsConfirmList(@Body ReceivingAndSendGoodsConfirmRequest confirmRequest,
                                                                                  @Header("pageNum") String pageNum,
                                                                                  @Header("pageSize") String pageSize);

    /**
     * 发货确认详情
     *
     * @param noticeOrderId 通知单ID
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.SEND_GOODS_CONFIRM_DETAIL)
    Observable<BaseInfo<ReceivingAndSendGoodsConfirmDetailBean>> getSendGoodsConfirmDetailList(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 发货确认过账
     *
     * @param noticeOrderId
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.SEND_GOODS_CONFIRM_DETAIL_POSTING_ACCOUNT)
    Observable<BaseInfo<ReceivingAndSendGoodsConfirmDetailBean>> postingAccountSendGoodsConfirm(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 通知单定位详情：
     * 确认定位(通知单未定位)
     *
     * @param noticeDetailRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.CONFIRM_LOCATION_BY_NOTICE_LOCATION_DETAIL_IN_BOUND)
    Observable<BaseInfo> confirmLocationByNoticeLocationDetailInBound(@Body ConfirmLocationNoticeDetailRequest noticeDetailRequest);

    /**
     * 通知单定位详情：
     * 确认定位(通知单未定位)
     *
     * @param noticeDetailRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.CONFIRM_LOCATION_BY_NOTICE_LOCATION_DETAIL_OUT_BOUND)
    Observable<BaseInfo> confirmLocationByNoticeLocationDetailOutBound(@Body ConfirmLocationNoticeDetailRequest noticeDetailRequest);

    /**
     * 通知单定位详情：
     * 删除定位(通知单未定位、通知单已定位)
     *
     * @param ids 多个ID用逗号分隔
     * @return
     */
    @POST(AppConfig.UrlSuffix.DELETE_LOCATION_BY_NOTICE_LOCATION_DETAIL)
    @FormUrlEncoded
    Observable<BaseInfo<ReceivingSendGoodsConfirmBean>> deleteLocationList(@Field("ids") String ids);

    /**
     * 出库定位--定位详情--删除定位
     * 3.7接口：删除定位
     *
     * @param ids
     * @return
     */
    @POST(AppConfig.UrlSuffix.DELETE_LOCATION_BY_NOTICE_LOCATION_DETAIL_OUT_BOUND)
    @FormUrlEncoded
    Observable<BaseInfo<ReceivingSendGoodsConfirmBean>> deleteLocationByNoticeLocationDetailOutBound(@Field("ids") String ids);

    /**
     * 通知单批量定位
     * 通知单批量定位UI界面接口数据
     *
     * @param noticeOrderId 通知单ID
     * @return
     */
    @POST(AppConfig.UrlSuffix.NOTICE_BATCH_LOCATION_UI)
    @FormUrlEncoded
    Observable<BaseInfo<List<MaterielPositionInfoBean>>> batchLocationNoticeUIByNoticeOrderId(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 通知单批量定位
     * 通知单批量定位UI界面接口数据
     *
     * @param orderId 订单ID（通知单id为空时）
     * @return
     */
    @POST(AppConfig.UrlSuffix.NOTICE_BATCH_LOCATION_UI)
    @FormUrlEncoded
    Observable<BaseInfo<List<MaterielPositionInfoBean>>> batchLocationNoticeUIByOrderId(@Field("orderId") String orderId);

    /**
     * 通知单批量定位UI界面：确认定位(通知单批量定位)
     * 2.9接口：wms/app/new/asn/position/batch/confirm
     *
     * @param noticeDetailRequest 请求参数对象
     * @return
     */
    @POST(AppConfig.UrlSuffix.NOTICE_BATCH_LOCATION_UI_CONFIRM_LOCATION)
    Observable<BaseInfo<InAndOutBoundLocationBean>> batchLocationUIByConfirmLocation(@Body ConfirmLocationNoticeDetailRequest noticeDetailRequest);

    /**
     * 订单批量定位UI界面：确认定位(订单批量定位)
     * 2.16接口：wms/app/new/asn/position/confirm
     *
     * @param noticeDetailRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.BATCH_LOCATION_BY_CONFIRM_LOCATION_IN_BOUND)
    Observable<BaseInfo<InAndOutBoundLocationBean>> batchLocationUIConfirmLocationByOrderId(@Body ConfirmLocationNoticeDetailRequest noticeDetailRequest);

    /**
     * 通知单批量作业
     * 通知单批量作业UI界面接口数据
     *
     * @param noticeOrderId 通知单ID
     * @return
     */
    @POST(AppConfig.UrlSuffix.NOTICE_BATCH_WORK_UI)
    @FormUrlEncoded
    Observable<BaseInfo<List<MaterielBatchWorkBean>>> batchWorkByNoticeUI(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 确认作业(通知单批量定位)
     * 通知单批量作业UI界面：确认作业按钮点击事件请求接口
     *
     * @param listBeans 请求参数对象
     * @return
     */
    @POST(AppConfig.UrlSuffix.NOTICE_BATCH_WORK_UI_CONFIRM_WORK)
    Observable<BaseInfo<InAndOutBoundLocationBean>> batchWorkUIByConfirmWork(@Body List<BaseItemBean> listBeans);

    /**
     * 订单批量作业UI界面接口数据
     *
     * @param orderId 订单ID
     * @return
     */
    @POST(AppConfig.UrlSuffix.ORDER_BATCH_WORK_UI)
    @FormUrlEncoded
    Observable<BaseInfo<List<MaterielBatchWorkBean>>> batchWorkByOrderUI(@Field("orderId") String orderId);

    /**
     * 通知单出入库详情：
     * 保存作业（未作业）
     *
     * @param noticeDetailRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.SAVE_WORK_BY_NOTICE_BOUND_DETAIL_IN_BOUND)
    Observable<BaseInfo> saveWorkNoticeBoundDetailInBound(@Body SaveWorkNoticeBoundDetailRequest noticeDetailRequest);

    /**
     * 通知单出出库详情：
     * 保存作业（未作业）
     *
     * @param noticeDetailRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.SAVE_WORK_BY_NOTICE_BOUND_DETAIL_OUT_BOUND)
    Observable<BaseInfo> saveWorkNoticeBoundDetailOutBound(@Body SaveWorkNoticeBoundDetailRequest noticeDetailRequest);

    /**
     * 登陆
     *
     * @return
     */
    @GET(AppConfig.UrlSuffix.APP_LOGIN)
    Observable<LoginResponse> tryLogin(@Query("username") String username, @Query("password") String password);

    /**
     * 库存查询
     */
    @POST(AppConfig.UrlSuffix.SEARCH_STOCK)
    Observable<BaseInfo<List<SearchStockBean>>> searchStock(@Body SearchStockRequest stockRequest);

    /**
     * 移库收货通知单列表
     */
    @POST(AppConfig.UrlSuffix.TRANSFER_NOTIFY_LIST)
    Observable<BaseInfo<List<TransGoodsBean>>> getTransGoodsList(@Body TransGoodsRequest transGoodsRequest,
                                                                 @Header("pageNum") String pageNum,
                                                                 @Header("pageSize") String pageSize);

    /**
     * 领料收货确认列表
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.GET_GOODS_CONFIRM_LIST)
    Observable<BaseInfo<List<OrderInAndOutBoundBean>>> getGoodsConfirmList(@Body OrderBoundRequest req,
                                                                           @Header("pageNum") String pageNum,
                                                                           @Header("pageSize") String pageSize);

    /**
     * 基础数据查询接口 文档v0.0.5 8.8
     *
     * @return
     */
    @GET(AppConfig.UrlSuffix.GET_DICTIONARY_LIST)
    Observable<BaseInfo<List<SelectDictionaryBean>>> getDictionaryList(@Query("type") String type);

    /**
     * 工厂查询
     *
     * @return
     */
    @GET(AppConfig.UrlSuffix.GET_FACTORY_LIST)
    Observable<BaseInfo<List<SelectDictionaryBean>>> getFactoryList();

    /**
     * 车间查询
     *
     * @return
     */
    @GET(AppConfig.UrlSuffix.GET_WORK_SHOP_LIST)
    Observable<BaseInfo<List<SelectDictionaryBean>>> getWorkShopList();

    /**
     * 客户查询
     *
     * @return
     */
    @GET(AppConfig.UrlSuffix.GET_CUSTOMER_LIST)
    Observable<BaseInfo<List<SelectDictionaryBean>>> getCustomerList();

    /**
     * 规格查询
     *
     * @param skuId 物料id
     * @return
     */
    @GET(AppConfig.UrlSuffix.GET_BAS_UNIT_LIST)
    Observable<BaseInfo<List<SelectDictionaryBean>>> getBasUnitList(@Query("skuId") String skuId);

    /**
     * 责任单位查询
     *
     * @return
     */
    @GET(AppConfig.UrlSuffix.GET_DEPART_LIST)
    Observable<BaseInfo<List<SelectDictionaryBean>>> getDepartList();

    /**
     * 责任人
     *
     * @return
     */
    @GET(AppConfig.UrlSuffix.GET_PERSON_LIST)
    Observable<BaseInfo<List<SelectDictionaryBean>>> getPersonList(@Query("departId") String departId);

    /**
     * 仓库查询 文档v0.0.5 8.4
     *
     * @return
     */
    @GET(AppConfig.UrlSuffix.GET_HOUSE_LIST)
    Observable<BaseInfo<List<SelectDictionaryBean>>> getHouseList(@Query("type") int type);

    /**
     * 库位查询(某个仓库下的库位)
     *
     * @return
     */
    @GET(AppConfig.UrlSuffix.GET_STOCK_POSITION_LIST)
    Observable<BaseInfo<List<SelectDictionaryBean>>> getStockPositionList(@Query("whId") String whId);

    /**
     * 物料查询 文档v0.0.5 8.4
     *
     * @return
     */
    @GET(AppConfig.UrlSuffix.GET_SKU_INFO_LIST)
    Observable<BaseInfo<List<SelectDictionaryBean>>> getSkuInfoList();

    /**
     * 新建移库单保存
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.SAVE_TF_ORDER)
    Observable<BaseInfo> saveTfOrder(@Body SaveTfOrderReq req);

    /**
     * 移库发货订单列表
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.MOVE_SEND_GOODS_ORDERS)
    Observable<BaseInfo<List<OrderInAndOutBoundBean>>> moveHouseSendGoodsOrderList(@Body Map<String, String> req,
                                                                                   @Header("pageNum") String pageNum,
                                                                                   @Header("pageSize") String pageSize);


    /**
     * 移库发货详情
     *
     * @param orderId 订单id
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.MOVE_SEND_GOODS_ORDERS_DETAILS)
    Observable<BaseInfo<MoveDetailBean>> moveHouseSendGoodsOrderDetail(@Field("orderId") String orderId);


    /**
     * 移库发货详情：
     * 保存作业（未作业）
     *
     * @param noticeDetailRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.SAVE_NOT_JOB_INFO)
    Observable<BaseInfo> saveNotJobInfo(@Body SaveJobInfoDetailRequest noticeDetailRequest);

    /**
     * 移库发货详情：
     * 保存作业（已作业）
     *
     * @param noticeDetailRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.SAVE_HAS_JOB_INFO)
    Observable<BaseInfo> saveHasJobInfo(@Body SaveJobInfoDetailRequest noticeDetailRequest);



    /**
     * 移库收货详情：
     * 保存作业（未作业）
     *
     * @param saveTransferGoodsRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.SAVE_TRANFERS_GOODS_NOT_JOB_INFO)
    Observable<BaseInfo<InAndOutBoundLocationBean>> saveTransferGoodsNotJobInfo(@Body SaveTransferGoodsRequest saveTransferGoodsRequest);

    /**
     * 移库收货详情：
     * 保存作业（已作业）
     *
     * @param saveTransferGoodsRequest
     * @return
     */
    @POST(AppConfig.UrlSuffix.SAVE_TRANFERS_GOODS_HAS_JOB_INFO)
    Observable<BaseInfo<InAndOutBoundLocationBean>> saveTransferGoodsHasJobInfo(@Body SaveTransferGoodsRequest saveTransferGoodsRequest);


    /**
     * 移库发货详情：
     * 删除作业(未作业、已作业)
     *
     * @param ids
     */
    @POST(AppConfig.UrlSuffix.DELETE_JOB)
    @FormUrlEncoded
    Observable<BaseInfo> deleteWorks(@Field("jobIds") String ids);

    /**
     * 移库收货详情：
     * 删除作业(未作业、已作业)
     *
     * @param ids
     */
    @POST(AppConfig.UrlSuffix.DELETE_TRANFERS_GOODS_JOB)
    @FormUrlEncoded
    Observable<BaseInfo> deleteTansferGoods(@Field("jobIds") String ids);

    /**
     * 获取盘点管理列表
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.GET_CHECK_MANAGER_LIST)
    Observable<BaseInfo<List<CheckManagerBean>>> getCheckManagerList(@Body CheckManagerRequest req,
                                                                     @Header("pageNum") String pageNum,
                                                                     @Header("pageSize") String pageSize);

    /**
     * 获取盘点明细
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.SEARCH_CHECK_DETAILS)
    Observable<BaseInfo<List<CheckDetailBean>>> loadCheckDetail(@Query("id") String req);

    /**
     * 移库收货确认通知单
     */
    @POST(AppConfig.UrlSuffix.CHANGE_HOUSE_CONFIRM)
    Observable<BaseInfo<List<ChangeHouseConfirmBean>>> getChangeAndGetGoodsNotifyList(@Body ChangeHouseConfirmRequest changeAndGetRequest,@Header("pageNum") String pageNum,
                                                                                      @Header("pageSize") String pageSize);

    /**
     * 获取移库收货确认详情
     */
    @POST(AppConfig.UrlSuffix.CHANGE_HOUSE_CONFIRM_DETAILS)
    Observable<BaseInfo<ChangeHouseConfirmDetailBean>> getConfirmDetails(@Query("noticeOrderId") String noticeOrderId);

    /**
     * 获取领料收货列表,v0.0.10 接口 5.12
     */
    @POST(AppConfig.UrlSuffix.GET_COLLECT_GOODS_LIST)
    Observable<BaseInfo<List<GetCollectGoodsListRes>>> getCollectGoodsList(@Body GetCollectGoodsListReq req,
                                                                           @Header("pageNum") String pageNum,
                                                                           @Header("pageSize") String pageSize);

    /**
     * 领料收货详情(未作业),v0.0.10 接口 5.13
     *
     * @param id 通知单id
     * @return
     */
    @POST(AppConfig.UrlSuffix.RECEIVE_JOB_DETAIL_FOR_NEW)
    @FormUrlEncoded
    Observable<BaseInfo<ReceiveJobDetail>> receiveJobDetailForNew(@Field("id") String id);

    /**
     * 保存库位转移
     */
    @POST(AppConfig.UrlSuffix.SAVE_CHANGE_CANG_KU_LBS)
    Observable<BaseInfo> saveChangeCuLbs(@Body SaveChangeCuLbs saveChangeCuLbs);

    /**
     * 保存属性转移
     */
    @POST(AppConfig.UrlSuffix.SAVE_CHANGE_CANG_KU_VALUE)
    Observable<BaseInfo> saveAttriChange(@Body AttriChangeRequest attriChangeRequest);

    /**
     * 保存在库整理
     */
    @POST(AppConfig.UrlSuffix.SAVE_PUT_IN_URL)
    Observable<BaseInfo> inSorageInfo(@Body InStorageRequest inStorageRequest);

    /**
     * 保存盘点
     */
    @POST(AppConfig.UrlSuffix.SAVE_STOCK_TAKING_URL)
    Observable<BaseInfo> saveStockTaking(@Body SaveStockTakingRequest stockTakingRequest);

    /**
     * 作业公司(人员查询)
     *
     * @param factoryId 来源订单对应工厂(发货作业对应stoOutFactoryId,收货作业对应stoInFactoryId)
     * @return
     */
    @POST(AppConfig.UrlSuffix.GET_OPERATE_COMPANY)
    @FormUrlEncoded
    Observable<BaseInfo<List<OperateCompanyInfo>>> getOperateList(@Field("factoryId") String factoryId);

    /**
     * 作业模式查询
     */

    @POST(AppConfig.UrlSuffix.GET_OPERATE_MODES)
    Observable<BaseInfo<List<OperateModle>>> getOperateModes();

    /**
     * 作业费率查询
     *
     * @param companyId
     * @param modeId
     * @return
     */
    @POST(AppConfig.UrlSuffix.GET_OPERATE_FEEDE)
    @FormUrlEncoded
    Observable<BaseInfo<List<OperateFeeduInfo>>> getOperateFeede(@Field("companyId") String companyId, @Field("modeId") String modeId);

    /**
     * 移库收货详情
     */
    @POST(AppConfig.UrlSuffix.CHNANGE_HOUSE_TAKE_GOODES_DETAILS)
    Observable<BaseInfo<TransferDetails>> getTransferDetails(@Query("noticeOrderId") String noticeOrderId);


    /**
     * 投料订单列表 v0.0.17 7.1
     *
     * @param keywork           关键字
     * @param companyId         公司id
     * @param factoryId         工厂id
     * @param productWorkshopId 车间id
     * @return
     */
    @POST(AppConfig.UrlSuffix.TOULIAO_ORDER_LIST)
    @FormUrlEncoded
    Observable<BaseInfo<List<TouliaoOrderInfo>>> getTouliaoOrderList(@Field("keywork") String keywork, @Field("companyId") String companyId
            , @Field("factoryId") String factoryId, @Field("productWorkshopId") String productWorkshopId,
                                                                     @Header("pageNum") String pageNum,
                                                                     @Header("pageSize") String pageSize);


    /**
     * 投料单列表（二级列表） v0.0.17 7.2
     *
     * @param orderId
     * @param keywork
     * @return
     */
    @POST(AppConfig.UrlSuffix.TOULIAO_PUT_ORDER_LIST)
    @FormUrlEncoded
    Observable<BaseInfo<List<TouliaoPutOrderInfo>>> getTouliaoPutOrderList(@Field("orderId") String orderId, @Field("keywork") String keywork);


    /**
     * 投料单详情 对应接口 v0.0.18 7.4
     *
     * @param noticeOrderId
     * @return
     */
    @POST(AppConfig.UrlSuffix.TOULIAO_SHEET_DETAIL)
    @FormUrlEncoded
    Observable<BaseInfo<TouliaoSheetDetailBean>> getTouliaoSheetDetail(@Field("noticeOrderId") String noticeOrderId);


    /**
     * 新增投料单 对应接口 v0.0.18 7.3
     *
     * @param orderId
     * @return
     */
    @POST(AppConfig.UrlSuffix.ADD_TOULIAO_SHEET)
    @FormUrlEncoded
    Observable<BaseInfo<TouliaoAddSheetBean>> addTouliaoSheet(@Field("orderId") String orderId);


    /**
     * 投料 作业保存 7.5
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.SAVA_TOULIAO)
    Observable<BaseInfo<String>> saveTouliao(@Body TouliaoSheetSavePost req);

    /**
     * 投料 作业过账 7.6
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.PASS_TOULIAO_BILL)
    Observable<BaseInfo<String>> passTouliaoBill(@Body TouliaoSheetSavePost req);

    /**
     * 生产订单列表 对应接口 v0.0.18 6.1
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.GET_ORDER_LIST)
    Observable<BaseInfo<List<OrderInfo>>> getOrderList(@Body PickOrderListReq req,  @Header("pageNum") String pageNum,
                                                       @Header("pageSize") String pageSize);


    /**
     * 配方列表 对应接口 v0.0.18 6.2
     *
     * @param omsOrderNo
     * @return
     */
    @POST(AppConfig.UrlSuffix.GET_FORMUALIST)
    @FormUrlEncoded
    Observable<BaseInfo<List<FormulaInfo>>> getFormuaList(@Field("omsOrderNo") String omsOrderNo);


    /**
     * 新建领料单  对应接口 v0.0.18 6.3
     *
     * @param jsonStr
     * @return
     */
    @POST(AppConfig.UrlSuffix.CREATE_MATERIER_BILL)
//    @FormUrlEncoded
    Observable<BaseInfo<String>> createMaterierBill(@Body CreateMaterierSheetPostInfo jsonStr);


    /**
     * 领料定位列表 对应接口 v0.0.18 6.4
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.GET_MATERIER_POSITION_LIST)
    Observable<BaseInfo<List<MaterierPositionOrderInfo>>> getMaterierPositionList(@Body PickOrderListReq req,  @Header("pageNum") String pageNum,
                                                                                  @Header("pageSize") String pageSize);


    /**
     * 领料定位详情
     *
     * @param noticeOrderId 通知单id 非空时调用
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.GET_MATERIER_POSITION_DETAIL)
    Observable<BaseInfo<PositionDetailBean>> getMaterierPositionDetail(@Field("noticeOrderId") String noticeOrderId);


    /**
     * 领料定位，未定位或者未定位 确认定位信息
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.GET_MATERIER_POSITION_SURE)
    Observable<BaseInfo<String>> getMaterierPostionSure(@Body MaterierPositionPost req);


    /**
     * 领料定位,删除定位信息
     *
     * @param ids
     * @return
     */
    @POST(AppConfig.UrlSuffix.DELETE_MATERIER_POSITION)
    @FormUrlEncoded
    Observable<BaseInfo<String>> deleteMaterierPostion(@Field("ids") String ids);

    /**
     * 领料发货列表
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.GET_MATERIER_SENDGOODS)
    Observable<BaseInfo<List<MaterierSendGoodsInfo>>> getMaterierSendGooodsList(@Body PickSendGoodsReq req,
                                                                                @Header("pageNum") String pageNum,
                                                                                @Header("pageSize") String pageSize);


    /**
     * 领料发货详情
     *
     * @param noticeOrderId 通知单id 非空时调用
     * @return
     */
    @FormUrlEncoded
    @POST(AppConfig.UrlSuffix.GET_MATERIER_SENDGOODS_DETAIL)
    Observable<BaseInfo<PickSendGoodsDetail>> getMaterierSendGoodsDetail(@Field("noticeOrderId") String noticeOrderId);


    /**
     * 领料发货详情 作业保存
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.SAVE_SENDGOODS_OPERATE)
    Observable<BaseInfo<String>> savaSendGoodsOperate(@Body MaterierSendGoodPost req);

    /**
     * 领料发货详情 作业保存
     *
     * @param req
     * @return
     */
    @POST(AppConfig.UrlSuffix.SAVE_RECEIVEJOBS)
    Observable<BaseInfo<String>> savaReceiverJobs(@Body ReceiveSaveJobPost req);

    /**
     * 领料发货详情 过账
     *
     * @param noticeOrderId
     * @return
     */
    @POST(AppConfig.UrlSuffix.SURE_RECEIVEJOBS)
    @FormUrlEncoded
    Observable<BaseInfo<String>> sureReceiverJobs(@Field("noticeOrderId") String noticeOrderId);

    /**
     * 文件上传
     *
     * @param file
     * @return
     */
    @POST(AppConfig.UrlSuffix.UPLOAD_FILE)
    @Multipart
    Observable<BaseInfo<String>> uploadFile(@Part() MultipartBody.Part file);

//    /**
//     * 文件上传
//     *
//     * @param ywbm   业务代码
//     * @param ywzj   业务id
//     * @param userId
//     * @param files  文件集
//     * @return
//     */
//    @POST(AppConfig.UrlSuffix.UPLOAD_FILE)
//    @Multipart
//    Observable<BaseInfo<String>> uploadFile(@Part("ywbm") RequestBody ywbm, @Part("ywzj") RequestBody ywzj,
//                                            @Part("userId") RequestBody userId, @Part() List<MultipartBody.Part> files);
}
